package com.dfqy.dao;

import com.dfqy.pojo.Event;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Author : atyushu
 * Package : com.dfqy.dao
 * ClassName : EventDao
 * Create : 2023/8/1 - 17:44
 * Version : v1.0
 * Description : The interface of dao for event.
 */
@Component
public interface EventDao {

    int insert(Event event);

    int delete(long... id);

    int update(Event event);

    Event getById(long id);

    int countByLike(@Param("poster") String poster, @Param("stype") String stype, @Param("title") String title);

    List<Event> page(@Param("no") int pageNo, @Param("size") int pageSize, @Param("poster") String poster, @Param("stype") String stype, @Param("title") String title);

    int updateVisitnums(long id);

    List<Event> getAll();

    List<Event> search(@Param("addr") String addr, @Param("stype") String stype, @Param("orderBy") String orderBy);

    List<Event> getTitle(@Param("no") int pageNo, @Param("size") int pageSize);

    int countTotal();
}
